fn main() {
    // bool
    let is_true: bool = true;
    println!("is_true = {}", is_true);

    let is_false: bool = false;
    println!("is_false = {}", is_false);


    // char 在rust里面，char是32位的
    let a = 'a';
    println!("a = {}", a);

    let b = '你';
    println!("b = {}", b);


    // 有符号类型：i18,i16,i32,i64
    // 无符号类型：u8,u16,u32,u64
    // 浮点型：f32,f64
    let c: i8 = -111;
    println!("c = {}", c);

    let d: f32 = 0.0009;
    println!("d = {}", d);


    // 自适应类型isize,usize
    println!("usize max = {}", usize::max_value());
    println!("isize max = {}", isize::max_value());

    // 数组
    // [type:size]
    let arr: [u32; 5] = [1,2,3,4,5];
    let arr1: [u32; 3] = [1,2,3];
    println!("arr[0] = {}", arr[0]);

    show(arr1);

    // 元组
    let tup: (i32, f32, char) = (-3, 3.69, '好');
    let tup = (-3, 3.69, '好');
    println!("{}", tup.0);
    println!("{}", tup.1);
    println!("{}", tup.2);

    // 元组拆解
    let (x, y, z) = tup;
    println!("x = {}", x);
    println!("y = {}", y);
    println!("z = {}", z);


    println!("Hello, world!");
}
fn show(arr:[u32;3]) {
    println!("----------------------");
    for i in &arr {
        println!("{}", i);
    }
    println!("----------------------");

}
